package cn.itcast.nems.studentrecord.dto.change;

import cn.itcast.nems.studentrecord.service.settlement.SettlementResult;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDate;

/**
 * 学籍和凭单的关联
 *
 * @author liyong
 * create: 2023-11-22 16:02:06
 **/
@Getter
@Setter
@ToString(callSuper = true)
public class StudentRecordJournalDTO extends AbstractStudentRecordChangeDTO{

    /**
     * 订单ID(凭单没有对应订单时为空)
     */
    private String orderId;

    /**
     * 订单行ID(凭单没有对应订单时为空)
     */
    private String orderLineId;

    /**
     * 目标班学籍ID
     */
    private String targetStudentRecordId;

    /**
     * 原班级标准服务天数
     */
    private Integer originClazzServiceDays;
    /**
     * 原班级结算天数（实际服务天数）
     */
    private Integer originClazzSettlementDays;
    /**
     * 原班级结算金额
     */
    private Integer originClazzSettlementAmount;

    public SettlementResult createSettlementResult() {
        SettlementResult result = new SettlementResult();
        result.setServiceDays(this.getOriginClazzServiceDays());
        result.setSettlementDays(this.getOriginClazzSettlementDays());
        result.setSettlementAmount(this.getOriginClazzSettlementAmount());
        return result;
    }

    // 学生原学籍信息
    private Integer multiPaymentAccountFlag;
    private String originPaymentAccountCode;
    private String originPaymentAccountName;
    // 财务填写的内容
    private LocalDate bizDate;
    private String paymentAccountCode;
    private String paymentAccountName;
}
